package com.wang.myblog.service;

import com.wang.myblog.common.PageResponse;
import com.wang.myblog.entity.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentService {

    boolean insert(Comment comment);

    boolean deleteById(Integer id);

    boolean deleteByReplyId(Integer id);

    boolean deleteByArticleId(Integer id);

    Comment queryById(Integer id);

    List<Comment> queryAll(Comment comment);

    boolean update(Comment comment);

    List<Comment> queryByArticleIdAndType(Integer aId, Integer type);

    List<Comment> queryUnRead(@Param("start") Integer start, @Param("limit") Integer limit);

    Integer getCount();

    Integer getUnReadCount();

    PageResponse queryByType(Integer draw,Integer start, Integer limit, Integer type,String searchMsg);

    Integer getCountByType(Integer type,String searchMsg);
}
